<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ～ ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------

use think\migration\Seeder;

class CmsMenusSeed extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        \catcher\Utils::importTreeData($this->getPermissions(), 'permissions', 'parent_id');
    }

    protected function getPermissions()
    {
       return array (
  0 => 
  array (
    'id' => 140,
    'permission_name' => '内容管理',
    'parent_id' => 0,
    'level' => '',
    'route' => 'cms',
    'icon' => 'el-icon-video-camera-solid',
    'module' => 'cms',
    'creator_id' => 1,
    'permission_mark' => 'cms',
    'component' => 'layout',
    'redirect' => '',
    'keepalive' => 1,
    'type' => 1,
    'hidden' => 1,
    'sort' => 1,
    'created_at' => 1618909227,
    'updated_at' => 1620956103,
    'deleted_at' => 0,
    'children' => 
    array (
      0 => 
      array (
        'id' => 171,
        'permission_name' => '栏目管理',
        'parent_id' => 140,
        'level' => '140',
        'route' => '/cms/category',
        'icon' => 'el-icon-s-flag',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'category',
        'component' => 'cmsCategory',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1618912610,
        'updated_at' => 1620956103,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 172,
            'permission_name' => '列表',
            'parent_id' => 171,
            'level' => '140-171',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'category@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 0,
            'created_at' => 0,
            'updated_at' => 1620369713,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 173,
            'permission_name' => '保存',
            'parent_id' => 171,
            'level' => '140-171',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'category@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 0,
            'created_at' => 0,
            'updated_at' => 1620369713,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 174,
            'permission_name' => '更新',
            'parent_id' => 171,
            'level' => '140-171',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'category@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 0,
            'created_at' => 0,
            'updated_at' => 1620369713,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 175,
            'permission_name' => '删除',
            'parent_id' => 171,
            'level' => '140-171',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'category@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 0,
            'created_at' => 0,
            'updated_at' => 1620369713,
            'deleted_at' => 0,
          ),
        ),
      ),
      1 => 
      array (
        'id' => 176,
        'permission_name' => '模型管理',
        'parent_id' => 140,
        'level' => '',
        'route' => '/cms/model',
        'icon' => 'el-icon-help',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'model',
        'component' => 'cmsModel',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1618923203,
        'updated_at' => 1620956103,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 177,
            'permission_name' => '列表',
            'parent_id' => 176,
            'level' => '140-176',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'model@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1618923203,
            'updated_at' => 1620909102,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 178,
            'permission_name' => '保存',
            'parent_id' => 176,
            'level' => '140-176',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'model@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1618923203,
            'updated_at' => 1620892464,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 179,
            'permission_name' => '更新',
            'parent_id' => 176,
            'level' => '140-176',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'model@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1618923203,
            'updated_at' => 1620892464,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 180,
            'permission_name' => '删除',
            'parent_id' => 176,
            'level' => '140-176',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'model@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1618923203,
            'updated_at' => 1620892464,
            'deleted_at' => 0,
          ),
        ),
      ),
      2 => 
      array (
        'id' => 182,
        'permission_name' => '友情链接',
        'parent_id' => 140,
        'level' => '140',
        'route' => '/cms/site/links',
        'icon' => ' el-icon-attract',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'siteLinks',
        'component' => 'cmsSiteLinks',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1620548662,
        'updated_at' => 1620956103,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 183,
            'permission_name' => '列表',
            'parent_id' => 182,
            'level' => '140-182',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'siteLinks@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1620548662,
            'updated_at' => 1620982550,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 184,
            'permission_name' => '保存',
            'parent_id' => 182,
            'level' => '140-182',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'siteLinks@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1620548662,
            'updated_at' => 1620905875,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 185,
            'permission_name' => '更新',
            'parent_id' => 182,
            'level' => '140-182',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'siteLinks@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1620548662,
            'updated_at' => 1620905875,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 186,
            'permission_name' => '删除',
            'parent_id' => 182,
            'level' => '140-182',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'siteLinks@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1620548662,
            'updated_at' => 1620905875,
            'deleted_at' => 0,
          ),
        ),
      ),
      3 => 
      array (
        'id' => 196,
        'permission_name' => '文章管理',
        'parent_id' => 140,
        'level' => '',
        'route' => '/cms/articles',
        'icon' => 'el-icon-s-finance',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'articles',
        'component' => 'cmsArticle',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1621216834,
        'updated_at' => 1621216834,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 197,
            'permission_name' => '列表',
            'parent_id' => 196,
            'level' => '140-196',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'articles@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1621216834,
            'updated_at' => 1621216834,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 198,
            'permission_name' => '保存',
            'parent_id' => 196,
            'level' => '140-196',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'articles@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1621216834,
            'updated_at' => 1621216834,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 199,
            'permission_name' => '更新',
            'parent_id' => 196,
            'level' => '140-196',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'articles@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1621216834,
            'updated_at' => 1621216834,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 200,
            'permission_name' => '删除',
            'parent_id' => 196,
            'level' => '140-196',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'articles@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1621216834,
            'updated_at' => 1621216834,
            'deleted_at' => 0,
          ),
        ),
      ),
      4 => 
      array (
        'id' => 203,
        'permission_name' => '文章详情',
        'parent_id' => 140,
        'level' => '',
        'route' => '/cms/articles/detail/:id?',
        'icon' => 'el-icon-s-order',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'articles',
        'component' => 'cmsArticleDetail',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 2,
        'sort' => 1,
        'created_at' => 1621475789,
        'updated_at' => 1621475789,
        'deleted_at' => 0,
      ),
      5 => 
      array (
        'id' => 204,
        'permission_name' => '标签管理',
        'parent_id' => 140,
        'level' => '',
        'route' => '/cms/tags',
        'icon' => 'el-icon-paperclip',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'tags',
        'component' => 'cmsTag',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1621606711,
        'updated_at' => 1621607174,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 205,
            'permission_name' => '列表',
            'parent_id' => 204,
            'level' => '140-204',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'tags@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1621606711,
            'updated_at' => 1621607174,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 206,
            'permission_name' => '保存',
            'parent_id' => 204,
            'level' => '140-204',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'tags@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1621606711,
            'updated_at' => 1621607174,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 207,
            'permission_name' => '更新',
            'parent_id' => 204,
            'level' => '140-204',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'tags@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1621606711,
            'updated_at' => 1621607174,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 208,
            'permission_name' => '删除',
            'parent_id' => 204,
            'level' => '140-204',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'tags@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1621606711,
            'updated_at' => 1621607174,
            'deleted_at' => 0,
          ),
        ),
      ),
      6 => 
      array (
        'id' => 211,
        'permission_name' => '用户管理',
        'parent_id' => 140,
        'level' => '',
        'route' => '/cms/users',
        'icon' => 'el-icon-user-solid',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'users',
        'component' => 'cmsUsers',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1622020257,
        'updated_at' => 1622020418,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 212,
            'permission_name' => '列表',
            'parent_id' => 211,
            'level' => '140-211',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'users@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622020257,
            'updated_at' => 1622020418,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 213,
            'permission_name' => '保存',
            'parent_id' => 211,
            'level' => '140-211',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'users@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622020257,
            'updated_at' => 1622020418,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 214,
            'permission_name' => '更新',
            'parent_id' => 211,
            'level' => '140-211',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'users@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622020257,
            'updated_at' => 1622020418,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 215,
            'permission_name' => '删除',
            'parent_id' => 211,
            'level' => '140-211',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'users@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622020257,
            'updated_at' => 1622020418,
            'deleted_at' => 0,
          ),
        ),
      ),
      7 => 
      array (
        'id' => 216,
        'permission_name' => '评论管理',
        'parent_id' => 140,
        'level' => '',
        'route' => '/cms/comments',
        'icon' => 'el-icon-s-help',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'comments',
        'component' => 'cmsComments',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1622022327,
        'updated_at' => 1622022327,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 217,
            'permission_name' => '列表',
            'parent_id' => 216,
            'level' => '140-216',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'comments@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622022327,
            'updated_at' => 1622022327,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 220,
            'permission_name' => '删除',
            'parent_id' => 216,
            'level' => '140-216',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'comments@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622022327,
            'updated_at' => 1622022327,
            'deleted_at' => 0,
          ),
        ),
      ),
      8 => 
      array (
        'id' => 221,
        'permission_name' => '轮播管理',
        'parent_id' => 140,
        'level' => '',
        'route' => '/cms/banners',
        'icon' => 'el-icon-picture-outline-round',
        'module' => 'cms',
        'creator_id' => 1,
        'permission_mark' => 'banners',
        'component' => 'cmsBanners',
        'redirect' => '',
        'keepalive' => 1,
        'type' => 1,
        'hidden' => 1,
        'sort' => 1,
        'created_at' => 1622073776,
        'updated_at' => 1622073776,
        'deleted_at' => 0,
        'children' => 
        array (
          0 => 
          array (
            'id' => 222,
            'permission_name' => '列表',
            'parent_id' => 221,
            'level' => '140-221',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'banners@index',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622073776,
            'updated_at' => 1622073776,
            'deleted_at' => 0,
          ),
          1 => 
          array (
            'id' => 223,
            'permission_name' => '保存',
            'parent_id' => 221,
            'level' => '140-221',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'banners@save',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622073776,
            'updated_at' => 1622073776,
            'deleted_at' => 0,
          ),
          2 => 
          array (
            'id' => 224,
            'permission_name' => '更新',
            'parent_id' => 221,
            'level' => '140-221',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'banners@update',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622073776,
            'updated_at' => 1622073776,
            'deleted_at' => 0,
          ),
          3 => 
          array (
            'id' => 225,
            'permission_name' => '删除',
            'parent_id' => 221,
            'level' => '140-221',
            'route' => '',
            'icon' => '',
            'module' => 'cms',
            'creator_id' => 1,
            'permission_mark' => 'banners@delete',
            'component' => '',
            'redirect' => '',
            'keepalive' => 1,
            'type' => 2,
            'hidden' => 1,
            'sort' => 1,
            'created_at' => 1622073776,
            'updated_at' => 1622073776,
            'deleted_at' => 0,
          ),
        ),
      ),
    ),
  ),
);
    }
}
